/*
 * Created on Feb 17, 2004
 *
 * Author: Sandeep Prakash
 * Project: Sucxentv2 (using leaf nodes only)
 */
package dbsucxentW.storageEdgeW.loadersW;

import java.io.File;
import java.sql.Connection;

import javax.xml.parsers.SAXParserFactory;

import dbsucxentW.storageEdgeW.entitiesW.LeafNodeCollection;
import dbsucxentW.storageEdgeW.entitiesW.PathCollection;
import dbsucxentW.storageEdgeW.loadersW.relationalW.JdbcOptionsProvider;
import dbsucxentW.storageEdgeW.loadersW.relationalW.PathCollectionRelational;
import dbsucxentW.storageEdgeW.loadersW.relationalW.RelationalStore;
import dbsucxentW.storageEdgeW.parserW.BranchOrderDecorator;
//klarinda 20060901 DocumentSummary not used in Edge
//import dbsucxent.storageEdge.parser.DocumentSummary;
import dbsucxentW.storageEdgeW.parserW.NodeExtractor;
import dbsucxentW.storageEdgeW.parserW.BufferedLeafNodeCollection;

/**
 * @author Administrator
 *
 * 
 */

public abstract class XmlShredder {
	
	protected String _file; //File to be shredded;
	
	protected NodeExtractor _parser;
	//klarinda 20060901 DocumentSummary not used in Edge
	//protected DocumentSummary _summary;
	protected LeafNodeCollection _leafCollector;
	
	protected Store _store;
	protected Connection _dbConnection;
	
	public XmlShredder( String file ){
		_file = file;
	}
	
	/**
	 * @return
	 */
	public String getFile() {
		return _file;
	}

	/**
	 * @param file
	 */
	public void setFile(String file) {
		_file= file;
	}

	public void shred() throws Exception{
		System.out.println( "XmlShredder.shred() call initParser");	//klarinda 20060823
		initParser();
		//parse();
		System.out.println( "XmlShredder.shred() call insert");		//klarinda 20060823
		insert();
		System.out.println( "XmlShredder.shred() finish insert");	//klarinda 20060823
	}
	
	protected void initParser() throws Exception{
	


	}
	
	
	public abstract void parse() throws Exception;
	public abstract void insert() throws Exception;
}
